package com.baizhi.app;

import com.baizhi.dao.ArticleDAO;
import com.baizhi.dao.BannerDAO;
import com.baizhi.entity.Article;
import com.baizhi.entity.Banner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("app/article")
public class AppArticleController {

    @Autowired
    private ArticleDAO articleDAO;
    @GetMapping("selectAll")
    public List<Article> selectAll(){
        List<Article> list = articleDAO.selectAll();
        return list;
    }
}
